package cn.xmkeshe.dao;

import cn.xmkeshe.model.Item;
import org.apache.ibatis.annotations.*;

import java.util.List;

public interface IItemDao {

  @Insert("insert into item(iid,title,note)values(#{iid},#{title},#{note})")
  public boolean doCreate(Item item);

  @Select("select * from item")
  public List<Item> findAll();

  @Delete("delete from item where iid = #{iid}")
  public boolean delete(String iid);

  @Update("update item set note = #{note} where iid = #{iid}")
  public boolean editNote(@Param("note")String note,@Param("iid")String iid);
}
